<template>
	<view class="page-detail">
		<view class="main">
			<view class="title">预约时间:{{info.times}}</view>
			<view class="title">委托单号:{{info.wtdh}}</view>
			<view class="title">预约车队:{{info.cdlist.cdname}}</view>
			<view class="title">预约班次:{{info.datelist.name1}}--{{info.datelist.name2}}</view>
		</view>
		
		<view class="main">
			<view>已经绑定司机</view>
			<view  v-for="(item,index) in bdslist" :key="index" >
				<view class="title">车牌:{{item.cp}} 司机:{{item.name}}</view>
				<view class="title">手机号:{{item.phone}} 状态:{{item.status==2?'已过磅':'未过磅'}}</view>
				
			</view>
		</view>
		
	
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				uid:'',
				cdinfo:[],
				info:null,
				bdslist:[]
			};
		},
		onLoad(op) {
			console.log(op)
			this.id = op.id
			this.uid = uni.getStorageSync('uid');
			this.init(this.id)
		},
		//自定义返回调转
		onBackPress(e){
			
				  uni.switchTab({
						url:"/pages/appoint/appoint"
					})
			
return true;
		},
		methods:{
			async init(id){
				let res2 =  await this.$api.getyuyinfo({id:id})
				this.info = res2.data.data;
				let res =  await this.$api.getbdlist({yid:id,uid:this.uid})
				this.bdslist = res.data.data;
			}
		},
	}
</script>

<style lang="scss">
page {
		background-color: #fff;
	}
.page-detail {
	padding-bottom: 120upx;
	.swiper-item {
		image {
			width: 100%;
			height: 400upx;
		}
	}
	.main {
		padding: 40upx;
		position: relative;
		.icon-collect {
			position: absolute;
			width: 50upx;
			height: 50upx;
			top: 24upx;
			right: 40upx;
		}
	}
	.title {
		font-size: 32upx;
		font-weight: bold;
		margin-top: 40upx;
		margin-bottom: 20upx;
	}
	
	.tag {
		margin-top: 20upx;
		margin-bottom: 30upx;
		.tag-item {
			padding: 10upx 20upx;
			background-color: rgb(186, 222, 252);
			color: rgb(33, 150, 243);
			margin-right: 20upx;
		}
	}
	.info {
		padding:30upx 0;
		display: flex;
		border-top: 1upx solid #dedede;
		border-bottom: 1upx solid #dedede;
		margin-bottom: 20upx;
		.info-item {
			width: 30upx;
			height: 90upx;
			line-height: 90upx;
			padding: 3upx;
			margin-left: 5upx;
			background-color:#cdd1d1;
			flex:0 0 33.33%;
			text-align: center;
		}
	}
	.note {
		.note-item {
			display: flex;
			color: #666;
			display: flex;
			align-items: center;
			margin-bottom: 20upx;
			image {
				width: 40upx;
				height: 40upx;
				margin-right: 10upx;
			}
			.n-left {
				width: 240upx;
				display: flex;
				align-items: center;
				text {
					margin-right: 0;
				}
			}
		}
	}
	.eqment {
		display: flex;
		flex-wrap: wrap;
		.eq-item {
			flex:0 0 20%; 
			flex-direction: column;
			image {
				width: 100upx;
				height: 100upx;
				
			}
		}
	}
	.fix-foot {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		
	}
	.call {
		    background-color: #007aff;
		    color: #fff;
		    width: 200px;
		    height: 50px;
		    margin: 0 auto;
		    line-height: 50px;
		    text-align: center;
	}
	.lf{
		    margin-left: 45%;
	}
	.atc {
		border: 3upx solid #007AFF;
	}
	.gs{
		margin-top: 20upx;
		margin-bottom: 20upx;
		font-size: 50upx;
		display: block;
	}
}
</style>
